#ifndef CAR_SUPPLY_H
#define CAR_SUPPLY_H

#include "car_supply_struct_csv.hpp"


class car_supply
{
  public:
	inline virtual ~car_supply() { }

//	virtual bool exist(int _id) =0;
//	virtual int supply(int _id) =0;

  private:
};



// implementation for csv files

class car_supply_csv: public car_supply
{
  public:
	car_supply_csv(char* filename): file(filename)
	{ }
	
	car_supply_csv(std::string filename): file(filename)
	{ }

/*	bool exist(int _id)
	{
		car_supply_struct_csv r;

		return find(_id, r);
	}

	int supply(int _id)
	{
		car_supply_struct_csv r;
		
		if(find(_id, r))
		{
			return r.name();
		}
		return 0;
	}
*/
//	inline ~car_supply_csv() { file = ""; }

  protected:

	static car_supply_struct_csv const find(int _id);	

  private:
	std::string file;
};

#endif
